{template common/contentheader}
<div class="setcontent">
	<div class="settitle">
		<h3>{lang censor_edit:admin}</h3>
	</div>
	<div class="setform">
		<form class="pzform" method="post" action="{url admin/contentcensor?act=edit&censorid=$censor['censor_id']}}" id="addform">
			
			<div class="formgroup">
				<label class="formlabel">{lang censor_word:admin}:</label>
				<div class="formcontrol">
					<input type="text" name="find" id="find" value="$censor['find']"/>
				</div>
				<span class="formhelp">{lang censor_word:admin}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang censor_behiver:admin}:</label>
				<div class="formcontrol">
					<select onchange="if($('#replacement').val()=='{REPLACE}'){$('#replacementtxt').css('display','block');}else{$('#replacementtxt').css('display','none');}" name="replacement" id="replacement">
					<option value="{BANNED}" {if strpos($censor['replacement'], 'BANNED')!=false}selected{/if}>{lang censor_banned:admin}</option>
					<option value="{MOD}" {if strpos($censor['replacement'], 'MOD')!=false}selected{/if}>{lang censor_mod:admin}</option>
					<option value="{REPLACE}" {if strpos($censor['replacement'], 'MOD')==false && strpos($censor['replacement'], 'BANNED')==false}selected{/if}>{lang censor_replace:admin}</option>
					</select>
					<input type="text" name="replacementtxt" id="replacementtxt" value="$censor['replacement']" style="display:  {if strpos($censor['replacement'], 'MOD')==false&&strpos($censor['replacement'], 'BANNED')==false}block{else}none{/if};"/>
				</div>
				<span class="formhelp">{lang censor_behiver:admin}</span>
			</div>
			
			<div class="formgroup">
				<label class="formlabel">{lang censor_type:admin}:</label>
				<div class="formcontrol">
					<select name="type" id="type">
					{loop $censortypes $type}
					<option value="$type['id']" {if $censor['type']==$type['id']}selected{/if}>$type['typename']</option>
					{/loop}
					</select>
					
				</div>
				<span class="formhelp">{lang censor_type:admin}</span>
			</div>
			
			<div class="formbuttons">
				<button type="submit" class="btn btn-primary">{lang save:admin}</button>
			</div>
		</form>
	</div>
</div>
{template common/contentfooter}